package PTA_7;

import java.util.Scanner;
class NotSanjiaoException extends Exception {
    public NotSanjiaoException(String message) {
        super(message);
    }
}
class Sanj {
    double x,y,z;
    public Sanj(double x,double y,double z) throws NotSanjiaoException {
        if(x+ y > z && x + z > y && y + z > x) {
            this.x = x;
            this.y = y;
            this.z = z;
        } else {
            throw new NotSanjiaoException("三边长不能构成三角形");
        }
    }
    public double getArea() {
        double key = (x + y + z) / 2;
        return Math.sqrt(key * (key - x) * (key - y) * (key - z));
    }
}
public class t3 {
    public static void main(String args[])   {
        try {
            Scanner scan=new Scanner(System.in);
            double a,b,c;
            a=scan.nextDouble();b=scan.nextDouble();c=scan.nextDouble();
            Sanj sj=new Sanj(a,b,c);
            System.out.println("三角形面积为："+sj.getArea());
        }catch(Exception e) {
            System.out.println(e);
        }
    }
}
